home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 January / macformat-020.iso / Shareware City / Developers / apps.to.go / DTS.Lib / DTS.Lib.headers / Print.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-06-10  |  2.3 KB  |  65 lines  |  [TEXT/MPS ]

  1. #ifndef __PRINT__
  2. #define __PRINT__
  3.  
  4. #ifndef __TYPES__
  5. #include <Types.h>
  6. #endif
  7.  
  8.  
  9.  
  10. OSErr            PrintDocument(FileRecHndl frHndl, Boolean jobDlg, Boolean firstJob);
  11.     /*
  12.     **    ¶ Print-loop function for AppsToGo document.
  13.     **
  14.     **    INPUT:    frHndl
  15.     **            jobDlg
  16.     **            firstJob
  17.     **    RESULT:    OSErr
  18.     **
  19.     **    This print-loop function is designed to be called under various situations.
  20.     **    The big issue that it handles is finder printing.  If multiple documents
  21.     **    are to be printed from the finder, the user should only see one job dialog
  22.     **    for all the files.  (If a job dialog is shown for each file, how does the
  23.     **    user know for which file the dialog is for?)  So, for situations where
  24.     **    there is more than one file to be printed, call this code the first time
  25.     **    with the firstJob boolean true.  Normally, the jobDlg boolean will also
  26.     **    be true, except that under 7.0, you may be printing in the background.
  27.     **    If this is the case, you don’t want a job dialog for even the first file,
  28.     **    and you should pass in false for the jobDlg boolean in this case.  For
  29.     **    files 2-N, you should pass false for both booleans.  For regular application
  30.     **    printing, you should pass true for both booleans, since the file is the
  31.     **    first (only) file, and you are not in the background.
  32.     **
  33.     **    After calling this function to print a document, you need to call it
  34.     **    again with a nil document handle.  The print record for the first (or only)
  35.     **    document printed is preserved in a static variable.  This is so that the
  36.     **    job dialog information can be passed on to documents 2-N in the print job.
  37.     **    Calling this function with the document handle nil tells this function
  38.     **    that you are done printing documents, and that the print record for the
  39.     **    first job can be disposed of. */
  40.  
  41.  
  42.  
  43. void            DonePrinting(void);
  44.     /*
  45.     **    ¶ Called after using PrintDocument for cleanup.
  46.     **
  47.     **    DonePrinting makes sure that PrintDocument gets rid of the prMergeHndl
  48.     **    print record that is used for multiple document printing.  Call this
  49.     **    after the last document is printed, or you get a memory leak. */
  50.  
  51.  
  52.  
  53. OSErr            PresentStyleDialog(FileRecHndl frHndl);
  54.     /*
  55.     **    ¶ Given document handle, present style dialog for document.
  56.     **
  57.     **    RESULT:    OSErr
  58.     **
  59.     **    Call this from the application to present a style dialog.  The changes are
  60.     **    automatically saved in the document. */
  61.  
  62.  
  63.  
  64. #endif
  65.